<aside class="box bg-grey">
	<h3>Tìm sự kiện</h3>
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'search-form',
	'action'=>array('/Events/search/index'),
	'enableClientValidation'=>false,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
	'htmlOptions'=>array(
		'class'=>'advance-search text-center'
	),
)); ?>
    <?php echo $form->textField($model, 'title', array('class'=>'form-control input-sm', 'placeholder'=>'Tên sự kiện')); ?>
    <?php echo $form->dropDownList($model,'category',CHtml::listData(Categories::model()->findAll(),'id','title', 'category.title'), array('class'=>'form-control input-sm', 'prompt'=>'Danh mục')); ?>
    <?php echo $form->dropDownList($model,'ticket',array('F'=>'Miễn phí', 'P'=>'Có phí', 'G'=>'Ưu đãi'), array('class'=>'form-control input-sm', 'prompt'=>'Loại vé')); ?>
    <?php echo $form->textField($model, 'start', array('class'=>'form-control input-sm', 'placeholder'=>'Thời gian bắt đầu')); ?>
    <?php echo $form->textField($model, 'end', array('class'=>'form-control input-sm', 'placeholder'=>'Thời gian kết thúc')); ?>
    <?php echo $form->textField($model, 'location', array('class'=>'form-control input-sm', 'placeholder'=>'Địa điểm')); ?>
    <button type="submit" class="btn btn-default btn-block">Tìm kiếm</button>
<?php $this->endWidget(); ?>
</aside>
<script type="text/javascript">
$(document).ready(function(e) {
    
    $('#SearchForm_start.form-control').datepicker({
		format: 'dd-mm-yyyy',
        autoclose: true
	});
	$('#SearchForm_end.form-control').datepicker({
		format: 'dd-mm-yyyy',
        autoclose: true
	});
});
</script>